<div class="inner-left">
<div class="col-corn-top">&nbsp;</div>
<h2>&nbsp;&nbsp;Categories</h2>
    <ul class="l-list-1">
        <?php foreach($categories["data"] as $category):?>
                <li><a href="<?php echo $this->baseurl("/manual/c/{$category['id']}/" . App::Load("Helper/Utility")->text2Normalize($category['title']));?>" <?php if($category['id']==$cid):?>class="link-selected" <?php endif;?>><?php echo($category['title']);?></a>
                        <?php $subcategories = $this->getsubCategory($category['id']);?>
                        <?php
                        if(!empty($subcategories) && ($category['id'] == $cid)):?>
                            <ul class="l-list-2">
                            <?php foreach($subcategories as $subcategory):?>
                                <?php if($subcategory['id']==$scid):?>
                                    <li><a href="<?php echo $this->baseurl("/manual/c/{$subcategory['id']}/" . App::Load("Helper/Utility")->text2Normalize($subcategory['title']));?>" class="link-selected"><?php echo($subcategory['title']);?></a></li>
                                <?php else:?>
                                    <li><a href="<?php echo $this->baseurl("/manual/c/{$subcategory['id']}/" . App::Load("Helper/Utility")->text2Normalize($subcategory['title']));?>"><?php echo($subcategory['title']);?></a></li>
                                <?php endif;?>
                            <?php endforeach;?>
                            </ul>
                        <? endif;?>
                </li>

        <?php endforeach;?>
    </ul>
    <div class="clearboth" ></div>
    <div class="col-corn-bottom">&nbsp;</div>
</div>
<div class="inner-right">


    <?php if($action == 'c'): ?>
        <h1><?php echo $categoryData['title'];?></h1>
        <?php echo stripslashes(App::Load("Helper/Utility")->codeFormated($categoryData['description']));?>
        <?php if(!empty($allPost['data'])):?>
            <div class="top_releted">
                <ul>
                <?php foreach( $allPost['data'] as $post):?>
                    <li><a href="<?php echo $this->baseurl("/manual/p/{$post['id']}/" . App::Load("Helper/Utility")->text2Normalize($post['title']));?>"><?php echo $post['title'];?></a></li>
                <?php endforeach;?>
                </ul>
                <div class="clearboth"></div>
            </div>
        <?php endif;?>
    <?php elseif($action=='p'):?>
            <h1><?php echo $post['title'];?></h1>
            <div>
                <div class="bread-crumb">
                <a href="<?php echo $this->baseurl("/manual");?>">Manual</a> >>
                <a href="<?php echo $this->baseurl("/manual/c/{$categoryData['id']}/" .App::Load("Helper/Utility")->text2Normalize($categoryData['title']));?>"><?php echo $categoryData['title'] ?></a> >>
                <?php echo $post['title'];?>
                </div>
                <div class="related-post">
                <div id="drop_down-container">
                    <ul id="drop_down_menu">
                        <li class="menu">View Other Posts
                            <ul class="links">
                                <?php echo $this->relatedPostLinks($categoryData['id']);?>
                            </ul>
                        </li>
                    </ul>
                </div>
                </div>
                <br class="clearboth" />
            </div>
            <?php echo stripslashes(App::Load("Helper/Utility")->codeFormated($post['description'],false));?>

        <p style="margin-top:10px">
            <a href="<?php echo $this->baseurl("/manual");?>">Manual</a> >>
            <a href="<?php echo $this->baseurl("/manual/c/{$categoryData['id']}/" .App::Load("Helper/Utility")->text2Normalize($categoryData['title']));?>"><?php echo $categoryData['title'] ?></a> >>
            <?php echo $post['title'];?>
        </p>
    <?php else:?>
        <?php echo stripslashes($page_content["content"]); ?>
    <?php endif;?>
	<br />
	<div class="inner"><?php  echo $this->getAddThisCode(); ?></div>
</div>

<div class="clearboth"></div>
<?php  echo $this->runSyntaxHighlighter();?>